import { Subject } from 'rxjs';

/**
 * MAINFORM_ORG
 *
 * @export
 * @class Main2Data
 */
export class Main2Data {

    /**
     * 忽略属性值变化
     *
     * @type {boolean}
     * @memberof Main2Data
     */
    public ignorefieldvaluechange: boolean = false;

    /**
     * 属性值变化
     *
     * @type {Subject<any>}
     * @memberof Main2Data
     */
    public fieldValueChange: Subject<any> = new Subject();

    /**
     * 更新时间
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _srfupdatedate: any = null;

    /**
     * 设置srfupdatedate值
     *
     * @memberof Main2Data
     */
    set srfupdatedate(val: any) {
        const oldVal = this._srfupdatedate;
        this._srfupdatedate = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfupdatedate', value: val });
        }
    }

    /**
     * 获取srfupdatedate值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get srfupdatedate(): any {
        return this._srfupdatedate;
    }

    /**
     * 
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _srforikey: any = null;

    /**
     * 设置srforikey值
     *
     * @memberof Main2Data
     */
    set srforikey(val: any) {
        const oldVal = this._srforikey;
        this._srforikey = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srforikey', value: val });
        }
    }

    /**
     * 获取srforikey值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get srforikey(): any {
        return this._srforikey;
    }

    /**
     * 组织机构标识
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _srfkey: any = null;

    /**
     * 设置srfkey值
     *
     * @memberof Main2Data
     */
    set srfkey(val: any) {
        const oldVal = this._srfkey;
        this._srfkey = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfkey', value: val });
        }
    }

    /**
     * 获取srfkey值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get srfkey(): any {
        return this._srfkey;
    }

    /**
     * 组织机构名称
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _srfmajortext: any = null;

    /**
     * 设置srfmajortext值
     *
     * @memberof Main2Data
     */
    set srfmajortext(val: any) {
        const oldVal = this._srfmajortext;
        this._srfmajortext = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfmajortext', value: val });
        }
    }

    /**
     * 获取srfmajortext值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get srfmajortext(): any {
        return this._srfmajortext;
    }

    /**
     * 
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _srftempmode: any = null;

    /**
     * 设置srftempmode值
     *
     * @memberof Main2Data
     */
    set srftempmode(val: any) {
        const oldVal = this._srftempmode;
        this._srftempmode = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srftempmode', value: val });
        }
    }

    /**
     * 获取srftempmode值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get srftempmode(): any {
        return this._srftempmode;
    }

    /**
     * 
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _srfuf: any = null;

    /**
     * 设置srfuf值
     *
     * @memberof Main2Data
     */
    set srfuf(val: any) {
        const oldVal = this._srfuf;
        this._srfuf = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfuf', value: val });
        }
    }

    /**
     * 获取srfuf值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get srfuf(): any {
        return this._srfuf;
    }

    /**
     * 
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _srfdeid: any = null;

    /**
     * 设置srfdeid值
     *
     * @memberof Main2Data
     */
    set srfdeid(val: any) {
        const oldVal = this._srfdeid;
        this._srfdeid = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfdeid', value: val });
        }
    }

    /**
     * 获取srfdeid值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get srfdeid(): any {
        return this._srfdeid;
    }

    /**
     * 
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _srfsourcekey: any = null;

    /**
     * 设置srfsourcekey值
     *
     * @memberof Main2Data
     */
    set srfsourcekey(val: any) {
        const oldVal = this._srfsourcekey;
        this._srfsourcekey = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfsourcekey', value: val });
        }
    }

    /**
     * 获取srfsourcekey值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get srfsourcekey(): any {
        return this._srfsourcekey;
    }

    /**
     * 组织机构名称
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _orgname: any = null;

    /**
     * 设置orgname值
     *
     * @memberof Main2Data
     */
    set orgname(val: any) {
        const oldVal = this._orgname;
        this._orgname = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'orgname', value: val });
        }
    }

    /**
     * 获取orgname值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get orgname(): any {
        return this._orgname;
    }

    /**
     * 上级机构
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _porgname: any = null;

    /**
     * 设置porgname值
     *
     * @memberof Main2Data
     */
    set porgname(val: any) {
        const oldVal = this._porgname;
        this._porgname = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'porgname', value: val });
        }
    }

    /**
     * 获取porgname值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get porgname(): any {
        return this._porgname;
    }

    /**
     * 组织编号
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _orgcode: any = null;

    /**
     * 设置orgcode值
     *
     * @memberof Main2Data
     */
    set orgcode(val: any) {
        const oldVal = this._orgcode;
        this._orgcode = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'orgcode', value: val });
        }
    }

    /**
     * 获取orgcode值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get orgcode(): any {
        return this._orgcode;
    }

    /**
     * 级别编码
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _levelcode: any = null;

    /**
     * 设置levelcode值
     *
     * @memberof Main2Data
     */
    set levelcode(val: any) {
        const oldVal = this._levelcode;
        this._levelcode = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'levelcode', value: val });
        }
    }

    /**
     * 获取levelcode值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get levelcode(): any {
        return this._levelcode;
    }

    /**
     * 简称
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _shortname: any = null;

    /**
     * 设置shortname值
     *
     * @memberof Main2Data
     */
    set shortname(val: any) {
        const oldVal = this._shortname;
        this._shortname = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'shortname', value: val });
        }
    }

    /**
     * 获取shortname值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get shortname(): any {
        return this._shortname;
    }

    /**
     * 备注
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _memo: any = null;

    /**
     * 设置memo值
     *
     * @memberof Main2Data
     */
    set memo(val: any) {
        const oldVal = this._memo;
        this._memo = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'memo', value: val });
        }
    }

    /**
     * 获取memo值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get memo(): any {
        return this._memo;
    }

    /**
     * 建立人
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _createman: any = null;

    /**
     * 设置createman值
     *
     * @memberof Main2Data
     */
    set createman(val: any) {
        const oldVal = this._createman;
        this._createman = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'createman', value: val });
        }
    }

    /**
     * 获取createman值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get createman(): any {
        return this._createman;
    }

    /**
     * 建立时间
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _createdate: any = null;

    /**
     * 设置createdate值
     *
     * @memberof Main2Data
     */
    set createdate(val: any) {
        const oldVal = this._createdate;
        this._createdate = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'createdate', value: val });
        }
    }

    /**
     * 获取createdate值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get createdate(): any {
        return this._createdate;
    }

    /**
     * 更新人
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _updateman: any = null;

    /**
     * 设置updateman值
     *
     * @memberof Main2Data
     */
    set updateman(val: any) {
        const oldVal = this._updateman;
        this._updateman = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'updateman', value: val });
        }
    }

    /**
     * 获取updateman值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get updateman(): any {
        return this._updateman;
    }

    /**
     * 更新时间
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _updatedate: any = null;

    /**
     * 设置updatedate值
     *
     * @memberof Main2Data
     */
    set updatedate(val: any) {
        const oldVal = this._updatedate;
        this._updatedate = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'updatedate', value: val });
        }
    }

    /**
     * 获取updatedate值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get updatedate(): any {
        return this._updatedate;
    }

    /**
     * 组织机构标识
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _orgid: any = null;

    /**
     * 设置orgid值
     *
     * @memberof Main2Data
     */
    set orgid(val: any) {
        const oldVal = this._orgid;
        this._orgid = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'orgid', value: val });
        }
    }

    /**
     * 获取orgid值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get orgid(): any {
        return this._orgid;
    }

    /**
     * 组织机构
     *
     * @private
     * @type {*}
     * @memberof Main2Data
     */
    private _porgid: any = null;

    /**
     * 设置porgid值
     *
     * @memberof Main2Data
     */
    set porgid(val: any) {
        const oldVal = this._porgid;
        this._porgid = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'porgid', value: val });
        }
    }

    /**
     * 获取porgid值
     *
     * @type {*}
     * @memberof Main2Data
     */
    get porgid(): any {
        return this._porgid;
    }

}